<!--
 * @Author: 260156 260156@gree.com.cn
 * @Date: 2022-08-15 11:26:20
 * @LastEditors: 260156 260156@gree.com.cn
 * @LastEditTime: 2022-08-15 17:20:10
 * @FilePath: \gree-zst-web\src\views\manage\log\components\LogHeader.vue
 * @Description: 
 * 
 * Copyright (c) 2022 by 260156 260156@gree.com.cn, All Rights Reserved. 
-->
<template>
  <div class="log-header">
    <div class="log-header-form">
      <label>时间：</label>
      <el-date-picker
        v-bind="$attrs"
        type="datetimerange"
        value-format="YYYY-MM-DD HH:mm:ss"
        start-placeholder="开始时间"
        end-placeholder="结束时间"
      ></el-date-picker>
      <el-button type="primary" @click="handleSearch">查询</el-button>
    </div>
    <el-button type="primary" @click="handleDownload"> 导出 </el-button>
  </div>
</template>
<script lang="ts" setup>
interface Emits {
  (e: "handleSearch"): void;
  (e: "handleDownload"): void;
}
const emit = defineEmits<Emits>();

const handleSearch = () => {
  emit("handleSearch");
};

const handleDownload = () => {
  // do download
  emit("handleDownload");
};
</script>

<style lang="scss" scoped>
.log-header {
  padding: 0 10px;
  display: flex;
  justify-content: space-between;
  &-form {
    display: flex;
    align-items: center;
    .el-button {
      margin-left: 20px;
    }
  }
}
</style>
